// 表单字段类型定义
const FormDataType = [
    "number",   // id
    "number",   // roleId
    "number",   // menuId
    "dateTime", // createTime
    "dateTime", // updateTime
    "number"    // isDeleted
];

// 表单默认数据
const FormData = {
    id: null,
    roleId: null,
    menuId: null,
    createTime: null,
    updateTime: null,
    isDeleted: null
};

// 字段标签
const labels = {
    id: "编号",
    roleId: "角色编号",
    menuId: "菜单编号",
    createTime: "创建时间",
    updateTime: "更新时间",
    isDeleted: "删除标记"
};

// 选项配置
const options = {
    isDeleted: [
        { value: 0, label: "不可用" },
        { value: 1, label: "可用" }
    ]
};

// 表格列配置
const tableColumns = [
    { prop: "id", label: "编号", sortable: true, align: "center" },
    { prop: "roleId", label: "角色编号", align: "center" },
    { prop: "menuId", label: "菜单编号", align: "center" },
    { prop: "createTime", label: "创建时间", sortable: true, align: "center" },
    { prop: "updateTime", label: "更新时间", sortable: true, align: "center" },
    { prop: "isDeleted", label: "删除标记", align: "center", formatter: (row) =>
            row.isDeleted === 1 ? "可用" : "不可用"
    }
];

// 统一导出配置
export const RoleMenuRelationFormConfig = {
    FormData,
    FormDataType,
    labels,
    options,
    tableColumns
};